package de.hsb.ai.domain;

import jade.core.AID;

/**
 * DummyAID is intended to simulated {@code NULL}-{@link AID AIDs}.
 */
public class DummyAID extends AID {
	
	private static final long serialVersionUID = 8342551342426876941L;
	
	private static final String NAME = "_dummy_";

	public DummyAID() {
		super(NAME + System.currentTimeMillis(), true);
	}
	
	/**
	 * Checks if the specified AID is a dummy.
	 * @param aid the AID to be checked
	 * @return true if the specified AID's name looks like a dummy, false otherwise
	 */
	public static boolean isDummy(AID aid) {
		return aid.getName().startsWith(NAME);
	}

}
